<div id="content">
	<div class="row s_page_title" *ngIf="pageType === 'new'">
		<sa-big-breadcrumbs [items]="['设备安装管理','审核管理','新增审核方案']" icon="fa fa-wrench"
			class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="row s_page_title" *ngIf="pageType === 'edit'">
		<sa-big-breadcrumbs [items]="['设备安装管理','审核管理','修改审核方案']" icon="fa fa-wrench"
			class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="row s_page_title" *ngIf="pageType === 'see'">
		<sa-big-breadcrumbs [items]="['设备安装管理','审核管理','查看审核方案']" icon="fa fa-wrench"
			class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="s_page_wrap">
		<div class="page-header">
			<h1 class="page_detail_title">{{pageTypeTitle}}审核方案</h1>
		</div>
		<div class="row" style="margin-top:5px;">
			<div class="col-xs-12">
				<form id="roleForm" class="form-horizontal" novalidate="novalidate">
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right"><sup>*</sup>方案名称</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" type="text" [(ngModel)]='examineName' name='examineName' placeholder="方案名称" autocomplete='off' [disabled]="pageType=='see'" />
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right"><sup>*</sup>车辆分类</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" [value]='examineCarText' name='examineCarText' *ngIf="pageType=='see'" disabled />
								<sa-tree-checkbox #dataTree wrap="body" htmlTreeId="wqewqe" [Height]="32" [hidden]="pageType=='see'" [dataValue]="carListArrays" (selectedValue)="selectedValue($event)"></sa-tree-checkbox>
							</div>
						</div>
					</div>
					<div class="table_scroll">
						<label class="control-label col-sm-1 no-padding-right" style="padding-right: 23px;"><sup>*</sup>审核配置</label>
						<div class="table_list">
							<button class="btn btn-primary" (click)="addExamineScheme(addExamineMsgModal)" style="color: #fff; margin-bottom: 10px;" [disabled]="pageType=='see'">新增审核内容</button>
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table" *ngIf="planConfigList.length">
								<thead>
									<tr>
										<th>审核内容</th>
										<th>内容</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of planConfigList; let i = index" [attr.data-index]="i">
										<td style="vertical-align: middle;">{{row.key}}</td>
										<td>
											<table
												style="width: 400px;"
												class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
												<thead>
													<tr>
														<th>节点名称</th>
														<th>操作</th>
													</tr>
												</thead>
												<tbody>
													<tr *ngFor="let item of row.value; let j = index" [attr.data-index]="j">
														<td>{{item}}</td>
														<td>
															<button type="button" (click)="examineNodeEdit(item, i, j, addExamineNodeModal)" [disabled]="pageType=='see'">编辑</button>
															<button type="button" (click)="examineNodeDelete(i, j)" [disabled]="pageType=='see'">删除</button>
														</td>
													</tr>
												</tbody>
											</table>
											<button class="btn btn-primary" (click)="addExamineNode(addExamineNodeModal, i)" style="color: #fff;" [disabled]="pageType=='see'">新增判定节点</button>
										</td>
										<td style="vertical-align: middle;">
											<button type="button" (click)="examineDelete(i)" [disabled]="pageType=='see'">删除</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
					<div class="center">
						<button type="submit" (click)='onSubmit()' class="btn btn-primary" [disabled]="pageType=='see'">提交</button>
						<button type="button" (click)='goBack()' class="btn default">返回</button>
					</div>
				</form>
				<div class="hr hr-dotted"></div>
			</div>
		</div>
	</div>
</div>
<!-- 新增审核内容   弹窗-->
<section bsModal #addExamineMsgModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
	aria-labelledby="myLargeModalLabel" aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<h4 class="modal-title">新增审核内容</h4>
			</div>
			<form class="form-horizontal" role="form" novalidate="novalidate">
				<div class="modal-body">
					<div class="row form-horizontal">
						<div class="form-group col-xs-12">
							<label class="control-label col-sm-2 no-padding-right">审核内容<sup>*</sup></label>
							<div class="col-sm-10">
								<select class="form-control" name="examineTypeId" [(ngModel)]="examineTypeId" style="width: 100%" (change)="examineTypeChange($event.target.value)">
									<option *ngFor="let item of examineType" [value]="item.value">{{item.label}}</option>
								</select>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" (click)="addExamineMsgClose(addExamineMsgModal)">取消</button>
					<button type="button" class="btn btn-primary" (click)="addExamineMsgSubmit(addExamineMsgModal)">确定</button>
				</div>
			</form>
		</div>
	</div>
</section>
<!-- 新增审核内容 弹窗end-->

<!-- 新增-编辑判定节点   弹窗-->
<section bsModal #addExamineNodeModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
	aria-labelledby="myLargeModalLabel" aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
				<h4 class="modal-title">{{nodeEditStatus?'编辑':'新增'}}判定节点</h4>
			</div>
			<form class="form-horizontal" role="form" novalidate="novalidate">
				<div class="modal-body">
					<div class="row form-horizontal">
						<div class="form-group col-xs-12">
							<label class="control-label col-sm-2 no-padding-right">判定节点<sup>*</sup></label>
							<div class="col-sm-10">
								<input class="form-control" type="text" [(ngModel)]='examineNodeName' name='examineNodeName' placeholder="判定节点名称" />
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" (click)="addExamineNodeClose(addExamineNodeModal)">取消</button>
					<button type="button" class="btn btn-primary" (click)="addExamineNodeSubmit(addExamineNodeModal)">确定</button>
				</div>
			</form>
		</div>
	</div>
</section>
<!-- 新增-编辑判定节点 弹窗end-->

<style type="text/css">
	.table_scroll {
		display: flex;
		margin-bottom: 20px;
	}
</style>